package com.cdtu.store.search.entity;

import com.cdtu.store.common.entity.BrandEntity;
import com.cdtu.store.common.entity.PageResult;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.Map;

/**
 * @author dongyuhao
 */
@Getter
@Setter
public class SearchResult<T> extends PageResult<T> {
    private List<Map<String, Object>> categories;
    private List<BrandEntity> brands;
    private List<Map<String, Object>> specs;
    public SearchResult() {
    }

    public SearchResult(List<Map<String, Object>> categories, List<BrandEntity> brands,List<Map<String, Object>> specs) {
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }

    public SearchResult(Long total, List<T> items, List<Map<String, Object>> categories, List<BrandEntity> brands,List<Map<String, Object>> specs) {
        super(total,items);
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }

    public SearchResult(Long total, Integer totalPage,List<T> items,List<Map<String, Object>> categories, List<BrandEntity> brands,List<Map<String, Object>> specs) {
        super(total, totalPage,items);
        this.categories = categories;
        this.brands = brands;
        this.specs = specs;
    }


}
